package indi.jp.project.center.service.impl;

import indi.jp.project.center.service.CenterService;
import indi.jp.project.core.dao.BaseDao;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;

/**
 * 中心总控接口实现
 *
 * @author jiangping
 * @date 2021/11/25
 */
@Service
public class CenterServiceImpl implements CenterService {

    private BaseDao baseDao;

    public CenterServiceImpl(BaseDao baseDao) {
        this.baseDao = baseDao;
    }

    @Override
    public Map<String, Integer> queryCenterData(Map<String, Object> params) throws SQLException {
        Map<String, Integer> map = new HashMap<>();
        int taskCount = baseDao.queryCount("centerMapper.queryTaskCount", params);
        int msgCount = 0;
        map.put("taskCount", taskCount);
        map.put("msgCount", msgCount);
        return map;
    }
}
